<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../application/vue.js"></script>
</head>
<body>
    <div id="app">
        <p>msg:{{msg}}</p>
        <p v-text="msg"></p>
        <input type="button" value="赋值msg" @click="msg='新的msg变量'">
        <hr>
        <p>comMsg:{{comMsg}}</p>
        <p v-text="comMsg"></p>
        <hr>
        <p>comInfo:{{comInfo}}</p>
        <input type="button" value="赋值info" @click="comInfo='新的info变量'">
        <hr>
        <p>fun:{{fun()}}</p>
        <p v-text="fun()"></p>
    </div>
</body>
<script>
    new Vue({
        el:"#app",
        data:{
            msg:"data数据仓库中变量msg",
            fun:function(){
                return `data中定义的方法`;
            }
        },
        computed:{
            comMsg(){
                return   `计算属性中的变量`;
                // return this.msg;
            },
            comInfo:{
                get(){
                    return `测试的info变量`;
                },
                set(nv){
                    console.log("info新值"+nv);
                }
            }
        }
    })
</script>
</html>